<?php
/*
	微信挪车用户端后台菜单
*/
defined('BY_JYA') or exit('error');
$plugins=model('jy_merch/plugins')->merch();
$basicitem=pdo_get('jy_merch_user',array('uniacid'=>$_SESSION['uniacid'],'id'=>$_SESSION['merchid']));
foreach($plugins as $ki=>&$item){
	$item['child']=$item['list'];
	unset($item['list']);
	foreach($item['child'] as $k=>&$p){
		if(!$p['is_show']){
			unset($item['child'][$k]);
		}else{
			$p['url']=$p['name'].'/basic.module_home//merch_menu=1';
		}
	}
}
$menus=array(
	array('title'=>'商户概况','fa'=>'icon-dianpu','url'=>'jy_merch/manage.index/','child'=>array(
		array('title'=>'商户概况','child'=>array(
			array('url'=>'jy_merch/manage.index/','title'=>'商户概况'),
			array('url'=>'jy_merch/manage.statistics.index/','title'=>'数据看板'),
			array('url'=>'jy_merch/manage.statistics.dao/','title'=>'导出销售统计'),
			array('url'=>'jy_merch/manage.workercount/','title'=>'店员绩效'),
			array('url'=>'jy_merch/manage.saler/list/','title'=>'员工管理'),
			array('url'=>'jy_merch/manage.yajin_log/list/','title'=>'押金记录'),
			array('url'=>'jy_merch/manage.creditlog/','title'=>'充值消费记录'),
			array('url'=>'jy_merch/manage.commission/','title'=>'商户佣金'),
			array('url'=>'jy_merch/manage.links/','title'=>'链接入口'),
		)),
		array('title'=>'销售统计','child'=>array(
			array('url'=>'jy_merch/manage.statistics.sale/','title'=>'销售统计'),
			array('url'=>'jy_merch/manage.statistics.sale_analysis/','title'=>'销售指标'),
			array('url'=>'jy_merch/manage.statistics.order/','title'=>'订单统计'),
		)),
		array('title'=>'商品统计','child'=>array(
			array('url'=>'jy_merch/manage.statistics.goods_days/','title'=>'销售统计'),
			array('url'=>'jy_merch/manage.statistics.goods/','title'=>'销售明细'),
			array('url'=>'jy_merch/manage.statistics.goods_rank/','title'=>'销售排行'),
			array('url'=>'jy_merch/manage.statistics.goods_trans/','title'=>'销售转化率'),
		)),
		array('title'=>'会员统计','child'=>array(
			array('url'=>'jy_merch/manage.statistics.member_cost/','title'=>'消费排行'),
			array('url'=>'jy_merch/manage.statistics.member_increase/','title'=>'增长趋势'),
		)),
	)),
	array('title'=>'商户商品','fa'=>'icon-cart1','url'=>'jy_merch/manage.good_list//status=1','child'=>array(
		array('title'=>'商户商品','child'=>array(
			array('url'=>'jy_merch/manage.good_list//status=1','title'=>'出售中'),
			array('url'=>'jy_merch/manage.good_out/','title'=>'已售罄'),
			array('url'=>'jy_merch/manage.good_list//status=0','title'=>'仓库中'),
			array('url'=>'jy_merch/manage.good_cycle/','title'=>'回收站'),
			array('url'=>'jy_merch/manage.good_verify/','title'=>'待审核'),
			array('url'=>'jy_merch/manage.good_group/','title'=>'商品分类'),
			array('url'=>'jy_merch/manage.good_package/','title'=>'商品组'),
			array('url'=>'jy_merch/manage.good_label/','title'=>'标签管理'),
			array('url'=>'jy_merch/manage.good_virtual_temp/','title'=>'虚拟卡密'),
			array('url'=>'jy_merch/manage.good_virtual_group/','title'=>'卡密分类'),
			array('url'=>'jy_merch/manage.good_virtual_set/','title'=>'卡密设置'),
		)),
		array('title'=>'云仓商品','child'=>array(
			array('url'=>'jy_merch/manage.goodyun_list/','title'=>'云仓商品'),
		)),
	)),
	array('title'=>'商户订单','fa'=>'icon-form','url'=>'jy_merch/manage.order_list//all=1','child'=>array(
		array('title'=>'普通订单','child'=>array(
			array('url'=>'jy_merch/manage.order_list//all=1','title'=>'全部订单'),
			array('url'=>'jy_merch/manage.order_list//status=1','title'=>'待发货'),
			array('url'=>'jy_merch/manage.order_list//status=2','title'=>'待收货'),
			array('url'=>'jy_merch/manage.order_list//status=0','title'=>'待付款'),
			array('url'=>'jy_merch/manage.order_list//status=3','title'=>'已完成'),
			array('url'=>'jy_merch/manage.order_list//status=4','title'=>'已关闭'),
			array('url'=>'jy_merch/manage.refund/','title'=>'维权申请'),
			array('url'=>'jy_merch/manage.order_list//status=6','title'=>'维权完成'),
			array('url'=>'jy_merch/manage.order_export/','title'=>'自定义导出'),
			array('url'=>'jy_merch/manage.order_batchsend/','title'=>'批量发货'),
			array('url'=>'jy_merch/manage.order_list//status=7','title'=>'异常报备'),
			array('url'=>'jy_merch/manage.baobei/','title'=>'异常报备记录'),
		)),
		array('title'=>'云仓订单','child'=>array(
			array('url'=>'jy_merch/manage.order_cailist/','title'=>'采购订单'),
			array('url'=>'jy_merch/manage.order_yuntotalset/','title'=>'云仓库存'),
			array('url'=>'jy_merch/manage.order_yunlist/','title'=>'云仓订单'),
		)),
	)),
	array('title'=>'订单核销','fa'=>'icon-wo1','url'=>'jy_merch/manage.verifylog/','child'=>array(
		array('title'=>'订单核销','child'=>array(
			array('url'=>'jy_merch/manage.verifylog/','title'=>'虚拟核销记录'),
			array('url'=>'jy_merch/manage.verifyselflog/','title'=>'取货核销记录'),
			array('url'=>'jy_merch/manage.verifygoods/','title'=>'记次时核销订单'),
			array('url'=>'jy_merch/manage.verifynumlog/','title'=>'记次时核销记录'),
		)),
	)),
	array('title'=>'餐饮收银台','fa'=>'icon-dixiaofei','url'=>'jy_merch/manage.table/','child'=>array(
		array('title'=>'桌台管理','child'=>array(
			array('url'=>'jy_merch/manage.table_group/','title'=>'桌台类型'),
			array('url'=>'jy_merch/manage.table/','title'=>'桌台列表'),
			array('url'=>'jy_merch/manage.tableorder/','title'=>'桌台业绩'),
			array('url'=>'jy_merch/manage.statistics.cyindex/','title'=>'收入统计'),
			array('url'=>'jy_merch/manage.addmember/','title'=>'桌台办理会员'),
			array('url'=>'jy_merch/manage.member/','title'=>'会员列表'),
		)),
		array('title'=>'前台收银','child'=>array(
			array('url'=>'jy_merch/manage.cyindex/','title'=>'餐饮直接收款'),
			array('url'=>'jy_merch/manage.cashorder/','title'=>'收银订单'),
		)),
		array('title'=>'销售统计','child'=>array(
			array('url'=>'jy_merch/manage.statistics.cygoods/','title'=>'销售统计'),
			array('url'=>'jy_merch/manage.statistics.cyline/','title'=>'销售走势'),
		)),
		array('title'=>'收银订单','child'=>array(
			//array('url'=>'jy_merch/manage.order_list/','title'=>'全部订单'),
			array('url'=>'jy_merch/manage.order_table/','title'=>'桌台订单'),
			array('url'=>'jy_merch/manage.order_in/','title'=>'非订单收款'),
			array('url'=>'jy_merch/manage.statistics.tplog/','title'=>'退品明细'),
			array('url'=>'jy_merch/manage.statistics.mllog/','title'=>'抹零明细'),
			array('url'=>'jy_merch/manage.statistics.zplog/','title'=>'赠品明细'),
		)),
		array('title'=>'排号管理','child'=>array(
			array('url'=>'jy_merch/manage.queue/user/','title'=>'客人队列'),
			array('url'=>'jy_merch/manage.queue/queue/','title'=>'队列列表'),
			array('url'=>'jy_merch/manage.queue/setting/','title'=>'排号设置'),
		)),
	)),
	array('title'=>'零售收银台','fa'=>'icon-dixiaofei','url'=>'jy_merch/manage.posgoods1//sendtype=2','child'=>array(
		array('title'=>'店内下单','child'=>array(
			array('url'=>'jy_merch/manage.posgoods1//sendtype=2','title'=>'收银下单'),
			array('url'=>'jy_merch/manage.statistics.cyindex/','title'=>'收入统计'),
			array('url'=>'jy_merch/manage.statistics.cygoods/','title'=>'销售统计'),
			array('url'=>'jy_merch/manage.statistics.cyline/','title'=>'销售走势'),
		)),
		array('title'=>'配送下单','child'=>array(
			array('url'=>'jy_merch/manage.posgoods1//sendtype=1','title'=>'配送下单'),
		)),
		array('title'=>'前台收银','child'=>array(
			array('url'=>'jy_merch/manage.cashindex/','title'=>'零售直接收款'),
			array('url'=>'jy_merch/manage.cashorder/','title'=>'收银订单'),
		)),
		array('title'=>'订单管理','child'=>array(
			array('url'=>'jy_merch/manage.order_list/','title'=>'全部订单'),
			array('url'=>'jy_merch/manage.statistics.tplog/','title'=>'退品明细'),
			array('url'=>'jy_merch/manage.statistics.mllog/','title'=>'抹零明细'),
			array('url'=>'jy_merch/manage.statistics.zplog/','title'=>'赠品明细'),
		)),
	)),
	array('title'=>'商户会员','fa'=>'icon-form','url'=>'jy_merch/manage.member/','child'=>array(
		array('title'=>'会员','child'=>array(
			array('url'=>'jy_merch/manage.member/','title'=>'会员列表'),
			array('url'=>'jy_merch/manage.member_level/','title'=>'会员等级'),
			array('url'=>'jy_merch/manage.catefans/','title'=>'发展粉丝'),
			array('url'=>'jy_merch/manage.xieyi/','title'=>'办理会员协议'),
		)),
		array('title'=>'支付记录','child'=>array(
			array('url'=>'jy_merch/manage.creditlog/','title'=>'充值消费记录'),
			array('url'=>'jy_merch/manage.inpaylog/','title'=>'线下扫码记录'),
			array('url'=>'jy_merch/manage.msglog/','title'=>'消息记录'),
			array('url'=>'jy_merch/manage.feelog/','title'=>'红包记录'),
		)),
	)),
	array('title'=>'打印机','fa'=>'icon-print','url'=>'jy_merch/manage.printlist/','child'=>array(
		array('title'=>'打印机','child'=>array(
			array('url'=>'jy_merch/manage.printlist/','title'=>'默认打印机管理'),
			array('url'=>'jy_merch/manage.feiprintlist/','title'=>'飞蛾打印机管理'),
			array('url'=>'jy_merch/manage.printer/','title'=>'打印任务管理'),
			array('url'=>'jy_merch/manage.printer_tpl/','title'=>'打印机模板'),
			array('url'=>'jy_merch/manage.printer_log/','title'=>'打印日志'),
		)),
	)),
	array('title'=>'商户营销','fa'=>'icon-gengduotupian','url'=>'jy_merch/manage.sale_enough/','child'=>array(
		array('title'=>'营销','child'=>array(
			array('url'=>'jy_merch/manage.sale_enough/','title'=>'满额/件优惠'),
			//array('url'=>'jy_merch/manage.sale_baoyou/','title'=>'满额包邮'),
			array('url'=>'jy_merch/manage.coupon_list/','title'=>'全部优惠券'),
			array('url'=>'jy_merch/manage.sendcoupon/','title'=>'手动发放'),
			array('url'=>'jy_merch/manage.coupon_log/','title'=>'发放记录'),
			array('url'=>'jy_merch/manage.coupon_hexiaolog/','title'=>'核销记录'),
			array('url'=>'jy_merch/manage.coupon_group/','title'=>'优惠券分类'),
			array('url'=>'jy_merch/manage.coupon_set/','title'=>'优惠券设置'),
			
		)),
		array('title'=>'活动','child'=>array(
			array('url'=>'jy_merch/manage.act_buyagain/','title'=>'重复购折扣'),
			array('url'=>'jy_merch/manage.act_sales/','title'=>'促销'),
			array('url'=>'jy_merch/manage.act_limit/','title'=>'限时卖'),
			array('url'=>'jy_merch/manage.act_presell/','title'=>'商品预售'),
			array('url'=>'jy_merch/manage.act_buyshow/','title'=>'买家秀'),
		)),
	)),
	array('title'=>'商户应用','isplugin'=>1,'fa'=>'icon-box','url'=>'jy_merch/manage.plugins/','child'=>$plugins),
	array('title'=>'商户结算','fa'=>'icon-licai','url'=>'jy_merch/manage.ordergoods_list/','child'=>array(
		array('title'=>'结算','child'=>array(
			array('url'=>'jy_merch/manage.ordergoods_list/','title'=>'待结算订单'),
			array('url'=>'jy_merch/manage.orderisgoods_list/','title'=>'已结算订单'),
			array('url'=>'jy_merch/manage.apply_list/status1','title'=>'待审核申请'),
			array('url'=>'jy_merch/manage.apply_list/status2','title'=>'待结算申请'),
			array('url'=>'jy_merch/manage.apply_list/status3','title'=>'已结算申请'),
			array('url'=>'jy_merch/manage.apply_list/status4','title'=>'无效申请'),
			array('url'=>'jy_merch/manage.apply_add/','title'=>'申请提现'),
		)),
	)),
	array('title'=>'商户设置','fa'=>'icon-shezhi','url'=>'jy_merch/manage.shop/','child'=>array(
		array('title'=>'设置','child'=>array(
			array('url'=>'jy_merch/manage.shop/','title'=>'小店设置'),
			array('url'=>'jy_merch/manage.setting/','title'=>'DIY商城类小店'),
			array('url'=>'jy_merch/manage.level/','title'=>'经销等级'),
			array('url'=>'jy_merch/manage.tihuo/','title'=>'提货点'),
			array('url'=>'jy_merch/manage.shop/diy','title'=>'DIY装修小店'),
			array('url'=>'jy_diypage/index//basicname=jy_merch','title'=>'DIY其他页面'),
		)),
		array('title'=>'客服设置','child'=>array(
			array('url'=>'jy_merch/manage.kefu/','title'=>'客服设置'),
		)),
	)),
);
if($basicitem['cashtype']==0){
    unset($menus[4]);
}
if($basicitem['cashtype']==1){
    unset($menus[5]);
}
if($this->plugin_exists('jy_kefu')){
	$menus[11]['child'][1]['child'][]=array('url'=>'jy_merch/manage.kefus/','title'=>'默认客服');
}
if($this->plugin_exists('jy_kefu')){
	$menus[11]['child'][1]['child'][]=array('url'=>'jy_merch/manage.kefuai/','title'=>'AI客服');
}
if(!$this->plugin_exists('jy_yuncangshop')){
	unset($menus[1]['child'][1]);
	unset($menus[2]['child'][1]);
}

return $menus;